const Router = require("koa-router");
const router = new Router();

router.get("/getLongData", async (ctx, res) => {
  // 获取get请求的参数
  // console.log(ctx.query);

  await new Promise((resolve) => {
    setTimeout(() => {
      resolve();
    }, 5000);
  });

  ctx.body = {
    code: 0,
    message: "请求成功！",
  };
});

module.exports = router;
